#pragma warning disable 0618
using System;
using System.Collections.Generic;
using Table.DataModel;
namespace Table.Dao
{
    public class TableRaidRunMapEnemyGroupDao:DaoBase<TableRaidRunMapEnemyGroup>
    {
        public override string GetFileName()
        {
            return "TableRaidRunMapEnemyGroup.csv";
        }
        public override void BuildIndex()
        {
            if (cacheList != null)
            {
                cachePrimaryInt = new Dictionary<int, TableRaidRunMapEnemyGroup>(cacheList.Count);
            }
            base.BuildIndex();
        }
        public override void AddPrimaryIndex(TableRaidRunMapEnemyGroup model)
        {
            #if UNITY_EDITOR
            if(cachePrimaryInt.ContainsKey(model.groupId)) UnityEngine.Debug.LogError("数据表id重复:TableRaidRunMapEnemyGroup->id: " + model.groupId);
            #endif
            cachePrimaryInt[model.groupId] = model;
        }
        protected override TableRaidRunMapEnemyGroup ParseRowData(string[] rowData)
        {
            TableRaidRunMapEnemyGroup data = new TableRaidRunMapEnemyGroup();
            if (!string.IsNullOrEmpty(rowData[0]))
            {
                data.groupId = int.Parse(rowData[0]);
            }
            if (!string.IsNullOrEmpty(rowData[1]))
            {
                data.episodeId = int.Parse(rowData[1]);
            }
            if (!string.IsNullOrEmpty(rowData[2]))
            {
                data.modelId = int.Parse(rowData[2]);
            }
            if (!string.IsNullOrEmpty(rowData[3]))
            {
                data.modelScale = double.Parse(rowData[3]);
            }
            if (!string.IsNullOrEmpty(rowData[4]))
            {
                data.bornX = double.Parse(rowData[4]);
            }
            if (!string.IsNullOrEmpty(rowData[5]))
            {
                data.bornY = double.Parse(rowData[5]);
            }
            if (!string.IsNullOrEmpty(rowData[6]))
            {
                data.bornZ = double.Parse(rowData[6]);
            }
            if (!string.IsNullOrEmpty(rowData[7]))
            {
                data.bornFaceTo = double.Parse(rowData[7]);
            }
            if (!string.IsNullOrEmpty(rowData[8]))
            {
                data.RotateSpeed = double.Parse(rowData[8]);
            }
            if (!string.IsNullOrEmpty(rowData[9]))
            {
                data.RestTime = double.Parse(rowData[9]);
            }
            if (!string.IsNullOrEmpty(rowData[10]))
            {
                data.PursueR = double.Parse(rowData[10]);
            }
            if (!string.IsNullOrEmpty(rowData[11]))
            {
                data.PursueAcc = double.Parse(rowData[11]);
            }
            if (!string.IsNullOrEmpty(rowData[12]))
            {
                data.PursueSpeed = double.Parse(rowData[12]);
            }
            if (!string.IsNullOrEmpty(rowData[13]))
            {
                data.ViewR = double.Parse(rowData[13]);
            }
            if (!string.IsNullOrEmpty(rowData[14]))
            {
                data.WanderSpeed = double.Parse(rowData[14]);
            }
            if (!string.IsNullOrEmpty(rowData[15]))
            {
                data.DeadParticleId = rowData[15];
            }
            if (!string.IsNullOrEmpty(rowData[16]))
            {
                data.BornParticleId = rowData[16];
            }
            if (!string.IsNullOrEmpty(rowData[17]))
            {
                data.loopMonster = int.Parse(rowData[17]);
            }
            if (!string.IsNullOrEmpty(rowData[18]))
            {
                data.isBoss = int.Parse(rowData[18]);
            }
            if (!string.IsNullOrEmpty(rowData[19]))
            {
                data.fightSceneId = int.Parse(rowData[19]);
            }
            if (!string.IsNullOrEmpty(rowData[20]))
            {
                data.priority = int.Parse(rowData[20]);
            }
            if (!string.IsNullOrEmpty(rowData[21]))
            {
                data.plotId0 = int.Parse(rowData[21]);
            }
            if (!string.IsNullOrEmpty(rowData[22]))
            {
                data.plotId1 = int.Parse(rowData[22]);
            }
            if (!string.IsNullOrEmpty(rowData[23]))
            {
                data.mutexBox = int.Parse(rowData[23]);
            }
            return data;
        }
    }
}
